﻿@model RealEstateApp.WebUI.Models.CustomerModel
<div class="span12">
    <div class="widget-box transparent">
        <div class="widget-header">
            <h5>
                <div class="btn-group">
                    <button type="button" class="btn btn-small btn-primary tabvwz">
					    <i class="icon-only icon-table"></i>
				    </button>
                    <button type="button" class="btn btn-small calvwz">
					    <i class="icon-only icon-calendar"></i>
				    </button>
                </div>
            </h5>
            <div class="widget-toolbar no-border">
            @using (Ajax.BeginForm("CreateTask", new { customerId = Model.CustomerId }, new AjaxOptions { HttpMethod = "Get", InsertionMode = InsertionMode.Replace, UpdateTargetId = "tasks" }))
            {
                <button class="btn btn-small btn-primary" type="submit">
                    <i class="icon-plus-sign bigger-120 blue"></i>
                    Thêm mới
                </button>
            }								
		</div>
        </div>
        <div class="widget-body">
            <div class="widget-main">
                <div class="row-fluid">
                <div class="task-table span12">
                    <table class="table table-striped table-bordered table-hover">
                <thead>
                    <tr>
                        <th>ID
                        </th>
                        <th>Nội dung
                        </th>
                        <th>Bắt đầu
                        </th>
                        <th>Kết thúc
                        </th>
                        <th></th>
                    </tr>
                </thead>
                @foreach (var item in Model.Tasks)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.TaskID)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.TaskName)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.StartDate)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.EndDate)
                        </td>

                        <td>
                            <div class="hidden-phone visible-desktop action-buttons">
                                <a class="blue" href="@Url.Action("Edit", new { id = item.TaskID })">
                                    <i class="icon-zoom-in bigger-130"></i>
                                </a>

                                <a class="red" href="@Url.Action("Delete", new { id = item.TaskID })">
                                    <i class="icon-trash bigger-130"></i>
                                </a>
                            </div>
                            @*@Html.ActionLink("Edit", "Edit", new { id = item.CustID }) |
                                    @Html.ActionLink("Details", "Details", new {  id=item.CustID  }) |
                                    @Html.ActionLink("Delete", "Delete", new {  id=item.CustID  })*@
                        </td>
                    </tr>
                }

            </table>
                </div>
                <div class="task-calendar span11" style="display: none">
                    <div class="space"></div>
                    <div id="calendar" style="top: 0"></div>
                </div>
                </div>
            </div>
        </div>
    </div>
</div>
